<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 500px;
            height: 200px;
            line-height: 200px;
            margin: 100px auto;
            text-align: center;
            background: skyblue;
        }
    </style>
</head>

<body>
    <div>
        <h2 v-if="gender === 1">男</h2>
        <h2 v-else>女</h2>
    </div>

    <script src="./js/dev/vue.js"></script>

    <script>
        const app = new Vue({
            el: 'div',
            data: {
                // 1:男 else 女
                gender: 1
            }
        })
    </script>
</body>

</html>